#ifndef _QL_MQTT_H_
#define _QL_MQTT_H_

#ifdef __cplusplus
	extern "C" 
{
#endif

/******************************************** Include Files **********************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "ql_mqttclient.h"
#include "ql_encrypt_md5.h"

// define event enum
typedef enum {
	ZQ_EVENT_MQTT = QL_EVENT_APP_START + 0x20,
	ZQ_EVENT_MQTT_REQUEST = ZQ_EVENT_MQTT,
	ZQ_EVENT_MQTT_REPLY,
} ZQ_EVENT_ENUM;

/*******************************************  Extern Function Declare  ***********************************************/
extern int ZyIsMqttConnected(void);
extern int mqtt_publish_msg(const char *ptopic, const char *ppayload, int qos);
extern int ZqMqttRegistTopic(int topic_msg_num, char* topic_str);
extern void zq_MqttInit(ql_task_t task);
extern int ZqMqttConnect(const char* host, const char* imei, const char* pkey, const char* dev_type);
extern void ZyMqttDisconnect(void);
#ifdef __cplusplus
}
#endif
#endif
/*********************************************************************************************************************/
/**********************************************  End Of File  ********************************************************/
/*********************************************************************************************************************/